Skip to content

build: declare Automatic-Module-Name for all published jars - #1706

Open
shubham-asthana wants to merge 1 commit into
awspring:mainfrom
shubham-asthana:feature/1635-jpms-automatic-module-name
Open

shubham-asthana wants to merge 1 commit into
awspring:mainfrom
shubham-asthana:feature/1635-jpms-automatic-module-name

Conversation

@shubham-asthana

@shubham-asthana shubham-asthana commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1635

Modular (JPMS) applications currently cannot depend on this project, because
none of its published jars declare module information. The JDK falls back to
deriving an automatic module name from the jar filename - a mechanism the JDK
itself documents as unstable across releases and not something a requires
clause should depend on.

This adds an explicit Automatic-Module-Name to every module, configured
centrally via the parent's maven-jar-plugin management and set per-module
through a new automatic.module.name property. Names match each module's
root Java package (e.g. io.awspring.cloud.sqs for spring-cloud-aws-sqs) so
they stay valid if a module later migrates to a real module-info.java.

Scope note: this is intentionally just the Automatic-Module-Name step, not
full JPMS modularization (module-info.java per module) - that would need
maintainer input on package/export boundaries first. Happy to adjust the
naming scheme if you'd prefer something else.

Verified by building the affected modules and inspecting the resulting jars
with jar --describe-module, confirming each resolves as a named automatic
module rather than a filename-derived one. I wasn't able to run the SQS
module's Docker-dependent integration tests in my environment, but this
change touches no Java source, only jar manifest metadata.

@github-actions github-actions Bot added component: parameter-store Parameter Store integration related issue component: secrets-manager Secrets Manager integration related issue component: ses SES integration related issue component: sns SNS integration related issue component: sqs SQS integration related issue type: dependency-upgrade Dependency version bump component: core Core functionality related issue component: dynamodb DynamoDB integration related issue labels Sep 21, 2026
Modular (JPMS) applications cannot depend on this project because none
of its published jars declare module information, so the JDK falls
back to deriving an automatic module name from the jar filename - a
mechanism the JDK itself documents as unstable across releases and
unsuitable to depend on in a `requires` clause.

This adds an explicit, stable Automatic-Module-Name to every module,
configured centrally in the parent's maven-jar-plugin management and
set per-module via a new automatic.module.name property. Names are
chosen to match each module's root Java package (e.g.
io.awspring.cloud.sqs for spring-cloud-aws-sqs) so they remain valid
if any module later migrates to a real module-info.java.

This is intentionally scoped to the automatic-module-name step only,
not full JPMS modularization (module-info.java per module), which
would need further design input on package/export boundaries.

Verified by building affected modules and inspecting the resulting
jars with `jar --describe-module`, confirming each now resolves as a
named automatic module instead of a filename-derived one.

Fixes awspring#1635
@shubham-asthana
shubham-asthana force-pushed the feature/1635-jpms-automatic-module-name branch from b94c80c to b5674df Compare September 21, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: core Core functionality related issue component: dynamodb DynamoDB integration related issue component: parameter-store Parameter Store integration related issue component: secrets-manager Secrets Manager integration related issue component: ses SES integration related issue component: sns SNS integration related issue component: sqs SQS integration related issue type: dependency-upgrade Dependency version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing module-info data

1 participant